package com.dataseek.iot.device.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dataseek.iot.toolkit.mybatis.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import javax.validation.Valid;
import java.util.Date;
import java.util.List;

@Data
@TableName(value = "tenant.question")
public class Question {

    @TableId(value = "id")
    private Long id;

    @TableField(value = "user_id")
    private String userId;

    @TableField(value = "title")
    private String title;

    @TableField(value = "type")
    private String type;

    @TableField(value = "status")
    private String status;

    @TableField(value = "content")
    private String content;

    @TableField(value = "fix_content")
    private String fixContent;

    //创建时间
    @TableField(value="create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    //更新时间
    @TableField(value="update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @Transient
    private transient List<QuestionImage> questionImageList;

    @TableField(value = "user_name")
    private String userName;
}
